/**
 * @Author: liangwanlang
 * @Date:   2023-03-20 14:41:02
 * @Last Modified by:   liangwanlang
 * @Last Modified time: 2023-03-20 14:44:18
 */
const csv = require('csvtojson')
// 文件系统模块执行文件操作
const fs = require('fs');
const converter = csv()
    .fromFile('./doc/password.csv')
    .then((json) => {
        console.log(`password length `,json.length)
        const jsonStr = 'const accountList = ' + JSON.stringify(json)
        fs.writeFile("password.json", jsonStr, 'utf8', function (err) {
            if (err) {
                return console.log(err);
            }
            console.log("JSON file has been saved.");
        });
    })
